public class Vertex {
	int value;
	int x;
	int y;

	public Vertex(Maze ma, int n) {
		x = n / ma.get_m(); // index of row
		y = n % ma.get_m(); // index of column
		value = n; // value = x*(number of columns maze) + y
	}

	public Vertex(int i, int j) {
		x = i;
		y = j;
		value = 0;
	}

	public Vertex(int n, int i, int j) {
		x = i;
		y = j;
		value = i * n + j;
	}

	public boolean equals(Vertex v) {
		if ((v.value == this.value) || ((v.x == this.x)&&(v.y == this.y)))
				return true;
		else
			return false;
	}

}
